﻿using System;
using UnityEngine;

namespace ProjectDanmaku.Core
{
    public class ScenarioManager : MonoBehaviour
    {
        private static ScenarioManager _instance;
        public static ScenarioManager Instance => _instance;
        
        [SerializeField] private GameObject initScenario;

        private void Awake()
        {
            if (_instance != null)
                DestroyImmediate(_instance);
            _instance = this;
        }

        private void Start()
        {
            if (transform.childCount == 0)
                Instantiate(initScenario, transform);
        }
    }
}